<template>
	<div class="test">
		<button @click="demo1">点我获取首页【三级分类信息】</button>
		<h1>{{a}}</h1>
		<!-- <h1>{{b}}</h1> -->
		<!-- <h1>{{name}}</h1> -->
		<!-- <h1>{{age}}</h1> -->
	</div>
</template>

<script>
	import {reqCategoryList} from '@/api'
	import {mapState} from 'vuex'

	export default {
		name:'Test',
		computed:{
			...mapState({
				a: state => state.home.a
			})
		},
		methods: {
			async demo1(){
				let result = await reqCategoryList()
				console.log(result)
			}
		},
	}
</script>

<style lang="less" scoped>
.test{
	background-color: gray;
	height: 200px;
	button{
		width: 320px;
		height: 50px;
		font-size: 20px;
	}
}
</style>